import ProxyInterface from '../proxy-interface';
import { MessageModel } from '../model/message';

class MessageProxy implements ProxyInterface<MessageModel> {
  private message: MessageModel = new MessageModel()

  constructor (responseData) {
    let data = responseData.data || responseData
    Object.assign<MessageModel, any>(this.message, data)
  }

  getModel (): MessageModel {
    return this.message
  }
}

export {
  MessageProxy
}
